<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>    
    <title>网上交易系统后台管理</title>    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
		
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/application.css"></c:url>">
	<script type="text/javascript" src="<c:url value="/js/jquery-1.10.2.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/js/jquery.js"/>"></script>
	<script type="text/javascript">
	
	  //控制导航栏的缩放 取hidden()为函数名可能有冲突
	  function hidden1(){
	  		
	         var navg=document.getElementById("navigator");
	         var obj=document.getElementById("navigator_controller");
	         var state=navg.style.display;
	        
	         if(state!='none'){
	           
	           navg.style.display="none";
	           obj.innerHTML="[显示导航]";
	           $("#content").css('margin-left','152px');
	         }else{
	           
	           navg.style.display="block";
	           obj.innerHTML="[隐藏导航]";
	           $("#content").css('margin-left','0px');
	         }
	  }
	function logout(){
	      alert("dd");
	      if(confirm("您确定要退出系统吗?")){
	          location.href="<c:url value="/securityMgr?act=logout"/>";
	      }
	      
	  }
	$(document).ready(function(){
	   
	   //管理员权限
	   var ss=document.getElementById("super");
	    	if(${loginedUser.managerName!='super'})
	    		ss.style.display='none';
	    	
	    //鼠标移动到菜单选项上，图标进行变换
	    $("li span").mouseover(function(){
	      $(this).css("cursor","pointer");
	    });
	    
	    //鼠标移到菜单选项上时，子菜单进行伸缩切换
	    $("li span").click(function(){
	      $(this).css("cursor","pointer");
	      //找到主菜单项对应的子菜单项
		  var ulNode = $(this).next("ul");
		  ulNode.slideToggle();
	    });
	 });  
	
	  </script>
	<style>
	body,iframe{
	  overflow: auto;
	}
	    a:link,a:visited {
		display: block;
		width: 100px;
		font-weight: bold;
		color: #FFFFFF;
		background-color: #bebebe;
		text-align: center;
		padding: 4px;
		text-decoration: none;
		}
		a:hover,a:active {
		background-color: #cc0000;
		}

	  li span{
	  font-weight: bold;
	  	font-size:14px;
	    background-color:#CCCCFF;
	  }
	  .marquee{
	  	height:20px;
	    width:120px;
	    position:absolute;
	    right:10px;
	    top:10px;
	    font-size:16px;
	    color:red;
	  }
	  .li_main ul{
	    display:none;
	  }
	  .nav_span{
		   font-size:15px;
	  }
	  ul li{
	   margin-top:5px;
	   list-style-type:none;
	  }
	  a{
 	    margin-left:15px;
	  }
	  div.navigator_controller{
	    position:absolute;
	    top:60px;
	    left:2px;
	    font-size:12px;
	    cursor:pointer;
	    color:blue;
	  }
	  div.log_out{
	    position:absolute;
	    right:25px;
	    top:45px;
	    font-size:15px;
	    color:blue;
	  }
	  #productName{
	    margin-top:2px;
	  }
</style>
  </head>
  
  <body>
    <div id="header">
        <div id="productName">网上交易系统后台管理</div>
        <div></div>
        <div></div>
     </div>
     <div class="navigator_controller" id="navigator_controller" onclick="javasript:hidden1();"><a>[隐藏导航]</a></div>
     <div>
       <input type="hidden" name="manager_name" value="${loginedUser.managerName}"/>
       <marquee class="marquee" title="${loginedUser}">${loginedUser.realName},欢迎您使用本系统</marquee>
       <div class="log_out" title="点击离开系统"><a href="javascript:logout();">安全离开</a></div>
       <div id="navigator" style="display:block;">
        <ul> 
              <li class="li_main" id="super">
                  <span class="nav_span">管理员信息管理</span> 
                  <ul>
                      <li><a href="<c:url value="/managerMgr?act=for_add"/>" target="contentFrame">添加管理员</a></li>
                      <li><a href="<c:url value="/managerMgr?act=for_list"/>" target="contentFrame">查询管理员</a></li>
                  </ul>
              </li>
           <div class="seperator"></div>
           	  <li class="li_main">
                  <span class="nav_span">商品类别管理</span>
                  <ul>
                      <li><a href="<c:url value="/category?act=for_add"/>" target="contentFrame">添加类别</a></li>
                      <li><a href="<c:url value="/category?act=list_all"/>" target="contentFrame">查询类别</a></li>
                  </ul>
              </li>
              <li class="li_main">
                  <span class="nav_span">商品信息管理</span>
                  <ul>
                      <li><a href="<c:url value="/goods?act=for_add"/>" target="contentFrame">添加商品</a></li>
                      <li><a href="<c:url value="/goods?act=list_all"/>" target="contentFrame">查询商品</a></li>
                  </ul>
              </li>
              <li class="li_main">
                  <span class="nav_span">订单信息管理</span>
                  <ul>
                      <li><a href="<c:url value="/indent?act=for_list"/>" target="contentFrame">查询订单</a></li>
                  </ul>
              </li>
              <div class="seperator"></div>
              <li class="li_main">
                  <span class="nav_span">会员信息管理</span>
                  <ul>
                     <li><a href="<c:url value="/userMgr?act=for_add"/>" target="contentFrame">添加会员</a></li>
                     <li><a href="<c:url value="/userMgr?act=for_list"/>" target="contentFrame">查询会员</a></li>
                  </ul>
              </li>             
              <li class="li_main" id="ordenary">
                  <span class="nav_span">个人管理中心</span>
                  <ul>
                      <li><a href="<c:url value="/managerMgr?act=for_selfupdate"/>" target="contentFrame">修改个人信息</a><br></li>
                  </ul>
              </li>
        </ul>        
    </div>
        <div id="content">
          <!-- inner frame -->
          <iframe id="contentFrame" name="contentFrame" width="1178" scrolling="no" height="520px" frameborder="0" name="contentFrame" allowtransparency="true" src="<c:url value="/welcome.jsp"/>">              
          </iframe>           
        </div>
     </div>
  </body>
</html>
